import threading
import time


def sleep_and_append(n, sorted_arr):
    time.sleep(n * 0.01)
    sorted_arr.append(n)


def sleep_sort(arr):
    sorted_arr = []
    threads = []
    for num in arr:
        thread = threading.Thread(target=sleep_and_append, args=(num, sorted_arr))
        thread.start()
        threads.append(thread)
    for thread in threads:
        thread.join()
    return sorted_arr

